
#ifndef _ASSET_H_
#define _ASSET_H_

#include <iosfwd>
#include <string>

#include "LibraryFrameworkExport.h"
#include "Assert.h"
#include "Assetable.h"
#include "Parsers\Xml\tinyxml2.h"
#include "Resources\Resource.h"
#include "StringUtils.h"

namespace CasaEngine
{
	/*
	 *	
	 */
	class LIBRARY_FRAMEWORK_EXPORT Asset : public IResource
	{
	public:
		Asset();
		~Asset();

		template<class T>
		T* GetAsset();

		void Load(const tinyxml2::XMLElement* node_);
		void Load(std::ifstream& in);

		//#ifdef EDITOR

		void Write(const tinyxml2::XMLElement* node_);
		void Write(std::ostream& os)const;

		// #endif // EDITOR

	private:
		//ID

		IAssetable *m_Object;


		void LoadAsset();

	}; // class Asset

	#include "Asset.inl"

} // namespace CasaEngine

#endif // _ASSET_H_
